<?php
namespace app\index\controller;
use app\BaseController;
use think\App;
use app\admin\model\Catelog;
use app\admin\model\Video as VideoModel;

class Base extends BaseController
{
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->cates = Catelog::where([['id','>','0']])->select();
        $this->videos = VideoModel::with('cate')->select();
        $this->topVideos = VideoModel::with('cate')->where(['style'=>1])->select()->toArray();
    }
}